#include<stdio.h>
#include<stdlib.h>
int seq_search(int array[] ,int n,int k, int seek_seq[] ){
	int i;
	for(int i=0;i<=n;i++){
		//TODO
		if(array[i]==k){
			seek_seq[i]=i;
			//TODO
			return 0;
		}
		else{
			seek_seq[i]=i;
		}
	}
	return -1;
}
int bin_search(int array[] ,int n,int k, int seek_seq[]){
	int low,high,mid,i=0;
	for(low=0,high=n;low<=high;){
		mid=(high+low-1)/2;
		if(array[mid]<k){
			seek_seq[i]=mid;
			low=mid+1;
			
			//TODO
		}else if(array[mid]=k){
			seek_seq[i]=mid;
			return mid;
		}else{
			seek_seq[i]=mid;
			high=mid-1;
		}
		i++;
	}
	return -1;
	
}
void main(){
   int a[5]={1,2,3,4,5};
   int c[5];
   printf("%d\n",seq_search(a,6,3,c));
   printf("%d\n",bin_search(a,6,3,c));
   system("pause");
}
